/*
 * Copyright (c) 2017. 杭州端点网络科技有限公司.  All rights reserved.
 */

package com.jiantong.user.service;

import com.google.common.base.Optional;
import com.jiantong.user.model.OrganizationUser;
import io.terminus.common.model.Paging;
import io.terminus.common.model.Response;

import java.util.List;
import java.util.Map;

/**
 * @author : panxin
 */
public interface OrganizationUserReadService {

    /**
     * 根据用户信息查询关联的组织机构信息
     *
     * @param userId 用户ID
     * @return 关联信息
     */
    Response<OrganizationUser> findOrganizationUserByUserId(Long userId);

    /**
     * 根据用户信息查询关联的组织机构信息
     *
     * @param userId 用户ID
     * @return 关联信息
     */
    Response<Optional<OrganizationUser>> findOptionalOrganizationUserByUserId(Long userId);

    /**
     * 政府端的员工查询
     * @return Paging<OrganizationUser>
     */
    Response<Paging<OrganizationUser>> pagingGOVStaff(Integer pageNo, Integer pageSize);

    /**
     * 非政府端的员工查询
     * @return Paging<OrganizationUser>
     */
    Response<Paging<OrganizationUser>> pagingFBStaff(Integer pageNo, Integer pageSize);

    /**
     * 条件查询user_id
     * @param criteria
     * @return
     */
    Response<List<Long>> selectUserIds(Map criteria);

    Response<List<OrganizationUser>> selectList(Map criteria);

    Response<List<String>> selectorgan();
}
